package org.rsbot.event.impl;

import java.util.logging.Logger;
import org.rsbot.event.events.MessageEvent;
import org.rsbot.event.listeners.MessageListener;

public class MessageLogger
  implements MessageListener
{
  private final Logger log = Logger.getLogger(MessageLogger.class.getName());

  public void messageReceived(MessageEvent paramMessageEvent) {
    if (paramMessageEvent.getSender().equals(""))
      this.log.info("[" + paramMessageEvent.getID() + "] " + paramMessageEvent.getMessage());
    else
      this.log.info("[" + paramMessageEvent.getID() + "] " + paramMessageEvent.getSender() + ": " + paramMessageEvent.getMessage());
  }
}